package org.jimmy.tang.designpattern.behavior.observer;

import java.util.ArrayList;
import java.util.List;

/**
 * @author jimmy
 * 
 */
public abstract class Citizen {
    List<Policeman> pols;

    String help = "normal";

    public void setHelp(String help) {
        this.help = help;
    }

    public String getHelp() {
        return help;
    }

    abstract void sendMessage(String help);

    public void setPolicemen() {
        pols = new ArrayList<Policeman>();
    }

    public void register(Policeman pol) {
        pols.add(pol);
    }

    public void unRegister(Policeman pol) {
        pols.remove(pol);
    }

}
